﻿@using Microsoft.AspNet.Identity
@model IEnumerable<Vnsf.WebHost.Models.OpportunityViewModel>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
User: @User.Identity.Name
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.MaxDuration)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.EstimateTotal)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.AwardCeiling)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.AwardFloor)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.StartDate)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Deadline)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Grant)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Description)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.MaxDuration)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.EstimateTotal)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.AwardCeiling)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.AwardFloor)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.StartDate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Deadline)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Grant)
            </td>
            <td>

                @Html.ActionLink("Details", "Details", new { id = item.Id }) |
                @Html.ActionLink("Apply", "Apply", "Application", new { opportunityId = item.Id }, null)
            </td>
        </tr>
    }

</table>
